package com.cg.client;

import com.cg.client.impl.MeetingClientImpl;
import com.cg.dto.Result;
import com.cg.entity.Meetingroom;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
@FeignClient(name = "meeting-provider",fallback = MeetingClientImpl.class)
public interface MeetingClient {

    /**
     * 查询全部会议室预定情况
     */
    @GetMapping("/meeting/queryMeetingRoomAll")
    public Result<List<Meetingroom>> queryMeetingRoomAll();


    /**
     * 查询所有的会议室名字
     */
    @GetMapping("/meeting/queryMeetingRoomName")
    public Result<List<Meetingroom>> queryMeetingRoomName();


    /**
     * 会议室预定
     */
    @PostMapping("/meeting/insertMeeting")
    public Result insertMeeting(@RequestBody Meetingroom meetingroom);
}
